<template>
 <div class="mine">
    <div class="mine-info">
      <div class="mine-icon">
         <van-icon name="setting-o" color="#fff" size="30px"/>
      </div>
      <div class="mine-content">
         <van-image
            round
            width="64px"
            height="64px"
            src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
         />
         <div class="mine-nickname">
            <span class="nickname">用户昵称(积分: 999)</span>
            <span class="phone">13131313131</span>
         </div>
      </div>
      <!-- 宫格 -->
      <div class="mine-grid">
         <van-grid :column-num="3">
            <van-grid-item icon="calendar-o" text="签到" />
            <van-grid-item icon="star-o" text="收藏" />
            <van-grid-item icon="smile-o" text="足迹" />
         </van-grid>
      </div>
    </div>
 </div>
</template>

<script>
// import { getUserInfo } from '../../api/mine'
export default {
 name: 'Mine',
 data() {
   return {}
 },
 computed: {
   userInfo(){
      return this.$store.getters['user/userInfo']
   }
 },
//  async created(){
//    const result = await getUserInfo()
//    console.log(result)
//  }
}
</script>

<style lang="scss" scoped>
.mine-info{
   width: 100%;
   height: 250px;
   background-color: rgba(217,83,65);
   .mine-icon{
      display: flex;
      justify-content: flex-end;
      padding: 20px;
   }
}
.mine-content{
   width: 300px;
   height: 68px;
   margin: 0 auto;
   display: flex;
}
.mine-nickname{
   display: flex;
   flex-direction: column;
   justify-content: center;
   margin-left: 10px;
   .nickname{
      font-size: 20px;
      color: #fff;
      font-weight: 700;
   }
   .phone{
      color: #fff;
   }
}
.mine-grid{
   width: 250px;
   height: 86px;
   margin: 0 auto;
}
</style>
